<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../packages-premium/bundle/main.css' rel='stylesheet' />
<script src='../packages-premium/bundle/main.js'></script>
<script>

  document.addEventListener('DOMContentLoaded', function() {
    var calendarEl = document.getElementById('calendar');

    var calendar = new FullCalendar.Calendar(calendarEl, {
      now: '2020-09-07',
      editable: true, // enable draggable events
      aspectRatio: 1.8,
      scrollTime: '00:00', // undo default 6am scrollTime
      headerToolbar: {
        left: 'today prev,next',
        center: 'title',
        right: 'resourceTimelineDay,resourceTimelineThreeDays,timeGridWeek,dayGridMonth'
      },
      initialView: 'resourceTimelineDay',
      views: {
        resourceTimelineThreeDays: {
          type: 'resourceTimeline',
          duration: { days: 3 },
          buttonText: '3 days'
        }
      },
      resourceAreaHeaderContent: 'Rooms',
      resourceLabelContent: function(arg) {
        return 'Auditorium ' + arg.resource.id.toUpperCase();
      },
      resourceLabelDidMount: function(arg) {
        if (arg.resource.id == 'h') {
          arg.el.style.backgroundColor = 'rgb(255, 243, 206)';
        }
      },
      resources: [
        { id: 'a' },
        { id: 'b', eventColor: 'green' },
        { id: 'c', eventColor: 'orange' },
        { id: 'd' },
        { id: 'e' },
        { id: 'f', eventColor: 'red' },
        { id: 'g' },
        { id: 'h' },
        { id: 'i' },
        { id: 'j' },
        { id: 'k' },
        { id: 'l' },
        { id: 'm' },
        { id: 'n' },
        { id: 'o' },
        { id: 'p' },
        { id: 'q' },
        { id: 'r' },
        { id: 's' },
        { id: 't' },
        { id: 'u' },
        { id: 'v' },
        { id: 'w' },
        { id: 'x' },
        { id: 'y' },
        { id: 'z' }
      ],
      events: [
        { id: '1', resourceId: 'b', start: '2020-09-07T02:00:00', end: '2020-09-07T07:00:00', title: 'event 1' },
        { id: '2', resourceId: 'c', start: '2020-09-07T05:00:00', end: '2020-09-07T22:00:00', title: 'event 2' },
        { id: '3', resourceId: 'd', start: '2020-09-06', end: '2020-09-08', title: 'event 3' },
        { id: '4', resourceId: 'e', start: '2020-09-07T03:00:00', end: '2020-09-07T08:00:00', title: 'event 4' },
        { id: '5', resourceId: 'f', start: '2020-09-07T00:30:00', end: '2020-09-07T02:30:00', title: 'event 5' }
      ]
    });

    calendar.render();
  });

</script>
<style>

  body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
    font-size: 14px;
  }

  #calendar {
    max-width: 1100px;
    margin: 50px auto;
  }

</style>
</head>
<body>

  <div id='calendar'></div>

</body>
</html>
